﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="editProduct.aspx.cs" Inherits="admin_editProduct" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link rel="stylesheet" type="text/css" href="html/css/admin.css" />
    <link rel="stylesheet" type="text/css" href="html/css/common.css" />
    <script type="text/javascript" language="javascript" src="../js/jquery-1.3.2.min.js"></script>    
    <script type="text/javascript" language="javascript" src="../js/GetAjax.js"></script>
    <script type="text/javascript" language="javascript" src="../js/jquery.form.js"></script>
    <style type="text/css">   
    .STYLE1 {
	    color: #e1e2e3;
    }
    .STYLE19 {
	    color: #344b50;
    }
    .STYLE21 {	
	    color: #3b6375;
    }
    .STYLE22 {	
	    color: #295568;
    }  
    </style>
</head>
<script type="text/javascript" language="javascript">
    var resetCon=function()
    {
        //document.addform.reset();
        var oEditor=FCKeditorAPI.GetInstance(source).EditorDocument.body.innerHTML="";
        return false;
    }
    $(function(){
        var options = { 
        beforeSubmit:  showRequest,  // pre-submit callback 
        success:       showResponse,  // post-submit callback 
        // other available options: 
         url:       "?action=update&pid="+$("#hid_id").val(),         // override for form's 'action' attribute 
       // type:        'post'        // 'get' or 'post', override for form's 'method' attribute 
        //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
        clearForm: false,        // clear all form fields after successful submit 
        resetForm: false        // reset the form after successful submit 
 
        // $.ajax options can be used here too, for example: 
        //timeout:   3000 
        }; 
        $("#btn_sub").click(function(){
            $("#loading").show();
            var oEditor = FCKeditorAPI.GetInstance("FCKeditor1") ;   
            oEditor.UpdateLinkedField(); 
            $('#addformAjax').ajaxSubmit(options);
            return false;    
        });
        function showResponse(msg)
        { 
            if(msg=="1")
            {
                alert("更新成功！");
                location.href=location.href;
            }
            else
            {
                alert(msg);   
                $("#loading").hide();    
            }
        } 
        function showRequest(formData, jqForm, options)
        { 
            return true; 
        }         
    });
</script>
<body onload="$('#loading').hide()">
<div id="loading" style="display:block">   
    <div class="loading-indicator">   
        页面正在加载中...   
    </div>   
</div> 
<div class="container" id="cpcontainer">
<form name="addform" id="addformAjax"  method="post"  >
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="30" height="19" valign="bottom"><div align="center" style="width:30px"><img src="html/images/tb.gif" width="14" height="14" /></div></td>
                <td valign="bottom"><span class="STYLE1">编辑产品类别</span></td>
              </tr>
            </table></td>
            <td></td>
          </tr>
        </table></td>
      </tr>
    </table>
	</td>
  </tr>
  <tr>
    <td>
	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">      
      <tr>
        <td width="200" height="20" align="center" bgcolor="#FFFFFF" class="STYLE21">产品名称：</td>
        <td bgcolor="#FFFFFF"><input id="txt_productName" name="txt_productName" type="text" class="commonText" style="width:200px" runat="server"/>
          &nbsp;<span style="color:red">*</span></td>        
        </tr>
      <tr>
        <td width="200" height="20" align="center" bgcolor="#FFFFFF" class="STYLE21">产品类别：</td>
        <td bgcolor="#FFFFFF">
            <select id="sel_productClass" name="sel_productClass">
                <%=ProductClassSelect()%>
            </select>
        </td>        
        </tr>
        <tr>
        <td width="200" align="center" bgcolor="#FFFFFF" class="STYLE21">相关描述：</td>
        <td bgcolor="#FFFFFF">
        <fckeditorv2:fckeditor id="FCKeditor1" runat="server" height="300px" toolbarset="Zrnet" width="650px" ></fckeditorv2:fckeditor>      
        </td>
        </tr>
		<tr>
        <td width="200" height="20" align="center" bgcolor="#FFFFFF" class="STYLE21">页面标题：</td>
        <td bgcolor="#FFFFFF">            
            <textarea id="txt_title" runat="server" name="txt_title" style="width: 490px; height: 69px">例如:XXXXX产品-xxx公司名称</textarea>
        </td>
        </tr>
        <tr>
        <td width="200" height="20" align="center" bgcolor="#FFFFFF" class="STYLE21">页面关键字：</td>
        <td bgcolor="#FFFFFF">            
            <textarea id="txt_key" runat="server" name="txt_key" style="width: 490px; height: 69px">例如:XXXXX产品-xxx公司名称</textarea>
        </td>
        </tr>
      <tr>
        <td width="200" height="20" align="center" bgcolor="#FFFFFF" class="STYLE21">页面描叙：</td>
        <td bgcolor="#FFFFFF">            
            <textarea id="txt_seoDescription" runat="server" name="txt_seoDescription" style="width: 490px; height: 69px">例如:XXXXX产品-xxx公司名称</textarea>
        </td>
        </tr>      
      <tr>
        <td height="24" id="btn_enter" align="center" bgcolor="#FFFFFF"></td>
        <td bgcolor="#FFFFFF"><input name="Input" value="确认保存" type="button" class="btn" id="btn_sub"/></td>
      </tr>
    </table></td>
  </tr> 
</table>
    <input id="hid_action" type="hidden" runat="server" value="add" />  
    <input id="hid_id" type="hidden" runat="server" value="0"/>   
</form>
</div>
</body>
</html>
